<template>
	<view>
		<view class="goods">
		</view>
		<view class="control">
			<uni-segmented-control :current="current" :values="items" @clickItem="onClickItem" style-type="button"
				active-color="#3472d4"></uni-segmented-control>
			<view class="content">
				<!-- <view class="jc" v-for="item in list"> -->
				<uni-card v-for="(item,index) in list" :key="index" @click="bu(item.enterid)" extra="额外信息" title="公司名称">
					{{item.entername}}
					<hr>
				
				</uni-card>
				
			</view>
		</view>
		<view>

		</view>
	</view>
</template>

<script>
	import uniSegametedCintrol from "@/uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.vue"
	export default {
		components: {
			uniSegametedCintrol
		},
		data() {

			return {
				user: {},
				eid: '',
				list: [],
				items: ['通讯录'],
				current: 0,
				value1: 0,
			}
		},
		onLoad() {
			this.a();
			this.getAll();
		},
		methods: {
			bu(enterid) {
				console.log(enterid)
				uni.reLaunch({
					url: './bumen?enterid=' + enterid
				})
			},
			getAll() {
				uni.request({
					url: 'http://localhost:8003/userproject/go/listme/' + this.eid,
					method: 'POST',
					success: (res) => {
						this.list = res.data.data.list
						console.log(this.list)
					}
				})
			},
			a() {
				this.user = uni.getStorageSync('user')
				console.log(this.user)
				this.eid = this.user.eid
				console.log(this.eid)
			},
			onClickItem(e) {
				if (this.current !== e.current) {
					this.current = e.currentIndex;
				}
			},
			click1(e) {
				console.log('click1', e);
			}

		}
	}
</script>

<style lang="scss" scoped>
	.txt {
		margin-left: 10rpx;
		margin-top: 10rpx;
		float: left;
	}

	.txt1 {
		margin-left: 50rpx;
		margin-top: 10rpx;
		float: left;
	}

	.zt {
		margin-top: -48rpx;
		margin-left: 180rpx;
		position: relative;
		z-index: index auto;

	}

	.txt-line2 {
		margin-top: 50rpx;
		margin-left: 10rpx;
	}

	.ztt {
		margin-top: -45rpx;
		margin-left: 210rpx;
		position: relative;
		z-index: 50;
		color: #ffd67a;
		font-family: cursive;
		font-weight: bold;
	}

	.goods-left {
		margin-top: 60rpx;

	}

	.goods-right {
		display: flex;
		flex-direction: column;
		justify-content: space-between;
	}

	.goods {
		background-color: #fff;
		padding: 30rpx;
		padding-bottom: 20rpx;
		display: flex;
		height: 140px;
	}

	.control {
		margin-top: -320rpx;
	}

	.jc {
		margin-top: 50rpx;
		margin-left: 20px;
	}

	.jct1 {
		margin-top: 20rpx;
	}

	.jct2 {
		margin-top: -40rpx;
		margin-left: 100px;
	}

	.ct {
		margin-top: 50rpx;
	}

	.cj {
		margin-left: 50px;
	}

	.ct2 {
		margin-top: 5px
	}
</style>
